#! /bin/sh
# building a model with "unif2"

hsfile=hsseis.out

# build the file of velocities
unif2 < model.unif2  nx=100 nz=500 dx=25 \
v00=5000,5500,6000,6500,7000,7500,8000 dz=10 > velocity.1

# build the file of densities
unif2 < model.unif2  nx=100 nz=500 dx=25 \
v00=1.0,2.25,2.25,2.25,2.35,2.35,2.35 dz=10 > density.1

# view the model
ximage < velocity.1 title="velocity profile" legend=1 \
xbox=10 ybox=10 n1=500 n2=100 d1=10 d2=25 &
ximage < density.1 title="density profile" legend=1 \
xbox=750 ybox=10 n1=500 n2=100 d1=10 d2=25 &

# finite difference modeling
sufdmod2 < velocity.1 xs=0 zs=100 nx=100 nz=500 dx=25 dz=10 \
dfile=density.1 fmax=80 tmax=12.0 nt=3001 hsz=10 hsfile=$hsfile abs=0,1,1,1 \
verbose=2 mt=10 > cube.out

# view movie
suxmovie < cube.out n1=500 n2=100 d1=10 d2=25 loop=1 &

exit 0
